#ifndef __ERROR_H
#define __ERROR_H
#include "stdtype.h"

/* error check */
#define E_ISOK(code) (code > 0)

typedef enum
{
    /* common */
    EOK = 0,
    EERR = 1,           // common error with unknown reasons

    /* driver */
    EDEV_NOTMATCHED,    // the device not matched the driver
    EDEV_NOTOPEN,       // the device not opened
    EDEV_BUSY,          // the device is be in use
} mx_err_t;

#endif
